<template>
	<view class="flex w-max row-around fs26 color-999">
		<view :class="{'color-000':value=='sum'}" @click="$emit('input','sum')">综合排序</view>
		<view class="flex" @click="$emit('input',value=='sales_asc'?'sales_desc':'sales_asc')">
			<view class="" :class="{'color-000':value=='sales_asc'||value=='sales_desc'}">销量</view>
			<view class="w20 h20 flex">
				<image src="/static/img/icon/index/sort1.png" class="wh-max" mode="aspectFit" v-if="value=='sales_asc'">
				</image>
				<image src="/static/img/icon/index/sort2.png" class="wh-max" mode="aspectFit"
					v-else-if="value=='sales_desc'"></image>
				<image src="/static/img/icon/index/sort0.png" class="wh-max" mode="aspectFit" v-else></image>
			</view>
		</view>
		<view class="flex" @click="$emit('input',value=='price_asc'?'price_desc':'price_asc')">
			<view class="" :class="{'color-000':value=='price_asc'||value=='price_desc'}">价格</view>
			<view class="w20 h20 flex">
				<image src="/static/img/icon/index/sort1.png" class="wh-max" mode="aspectFit" v-if="value=='price_asc'">
				</image>
				<image src="/static/img/icon/index/sort2.png" class="wh-max" mode="aspectFit"
					v-else-if="value=='price_desc'"></image>
				<image src="/static/img/icon/index/sort0.png" class="wh-max" mode="aspectFit" v-else></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "screen",
		props:{
			value:{
				default:'sum',//sum=综合排序,sales_asc=销量正序,sales_desc=销量倒序,price_asc=价格正序,price_desc=价格倒序
			}
		},
		data() {
			return {};
		},
	}
</script>

<style lang="scss">

</style>
